﻿<Views:ViewPage
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
               xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
               xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
               xmlns:Views="clr-namespace:PhoneGuitarTab.Core.Views;assembly=PhoneGuitarTab.Core" 
               xmlns:Controls="clr-namespace:PhoneGuitarTab.UI.Controls" x:Class="PhoneGuitarTab.UI.TextTabView"
               x:Name="root"
               xmlns:custom="clr-namespace:PhoneGuitarTab.Controls;assembly=PhoneGuitarTab.Controls"
               xmlns:ui="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
               DataContext="{Binding TextTab, Source={StaticResource Locator}}"
               FontFamily="{StaticResource PhoneFontFamilyNormal}"
               FontSize="{StaticResource PhoneFontSizeNormal}"
               Foreground="{StaticResource PhoneForegroundBrush}"
               Orientation="Portrait"
               Style="{StaticResource TransitionPageStyle}"
               SupportedOrientations="PortraitOrLandscape"
               d:DesignHeight="768"
               d:DesignWidth="480"
               shell:SystemTray.IsVisible="False"
               mc:Ignorable="d"
               BackKeyPress="TextTabView_OnBackKeyPress"
               OrientationChanged="root_OrientationChanged">
    <!-- ApplicationBar -->
    <custom:Bindable.ApplicationBar>
        <custom:BindableApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default" BindableOpacity="0.5" >
            <custom:BindableApplicationBarButton x:Name ="AutoScrollApplicationBarIconButton" IconUri="/Images/light/AutoScroll_Light.png" IsEnabled="True" 
                                                 Text="{Binding Path=LocalizedResources.TextTab_Autoscroll, Source={StaticResource LocalizedStrings}}" 
                                                 Command="{Binding ToggleSlide}"  CommandParameter="true"/>

            <custom:BindableApplicationBarButton x:Name ="PinToStartIconButton" IconUri="/Images/light/pinTab.png" IsEnabled="True" 
                                            Text="{Binding Path=LocalizedResources.TextTab_Pin, Source={StaticResource LocalizedStrings}}" Command="{Binding PinToStart}"/>
            <custom:BindableApplicationBar.MenuItems>
                <custom:BindableApplicationBarMenuItem x:Name="LightMode" IsEnabled="True" 
                                              Text="{Binding Path=LocalizedResources.Shared_LightMode, Source={StaticResource LocalizedStrings}}" Command="{Binding ToggleLightMode}" />
            </custom:BindableApplicationBar.MenuItems>
        </custom:BindableApplicationBar>
    </custom:Bindable.ApplicationBar>
    
    <!--  LayoutRoot is the root grid where all page content is placed  -->
    <Grid x:Name="LayoutRoot"  Background="Transparent" >
             
        <Grid x:Name="BrowserContainer">
            <Grid.RowDefinitions>
                <RowDefinition Height="38*"/>
                <RowDefinition Height="327*"/>
                <RowDefinition Height="35*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="13*"/>
                <ColumnDefinition Width="366*"/>
                <ColumnDefinition Width="12*"/>
                <ColumnDefinition Width="89*"/>
            </Grid.ColumnDefinitions>
            <phone:WebBrowser x:Name="tabWebBrowser"  
			IsScriptEnabled="True" Grid.ColumnSpan="4" Grid.RowSpan="3"  MouseLeftButtonUp="tabWebBrowser_MouseLeftButtonUp" ScriptNotify="tabWebBrowser_ScriptNotify" Loaded="tabWebBrowser_Loaded" />
            <Controls:AutoScroll x:Name="slider" 
                             HorizontalAlignment="Left" 
                             Margin="19,72,0,0" 
                             VerticalAlignment="Top" 
                             Height="176" 
                             Width="60" Grid.Column="3" Visibility="Collapsed" Grid.Row="1"/>
        </Grid>
        <Grid x:Name="AdContainer">
            <ui:AdControl x:Name="AdControl" ApplicationId="398538e9-3217-46b2-90d2-58bd4208d95f" AdUnitId="10867700" HorizontalAlignment="Center" Height="80" VerticalAlignment="Bottom" Width="480" Visibility="{Binding IsAdEnabled, Converter={StaticResource boolVisibility}}" Margin="0,0,0,72"  />
        </Grid>
           
    </Grid>


</Views:ViewPage>
